package com.bdqn.tour.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


public class MyConfig {
    static Properties properties = new Properties();
    static{
        InputStream inputStream = MyConfig.class
                .getClassLoader()
                .getResourceAsStream("config.properties");
        try {
            properties.load(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static String getValue(String key){
       return properties.getProperty(key,"");
    }

    public static void main(String[] args) throws Exception {
        System.out.println(MyConfig.getValue("filePath"));
        System.out.println(MyConfig.getValue("name"));

    }
}
